﻿<Window x:Class="RL.wEnterpriseInfo"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Организация" Height="300" Width="300" Loaded="Window_Loaded" Closing="Window_Closing" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:my="clr-namespace:RL">
    <Window.Resources>
        <CollectionViewSource x:Key="enterpriseViewSource" d:DesignSource="{d:DesignInstance my:Enterprise, CreateList=True}" />
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="35"/>
            <RowDefinition />
        </Grid.RowDefinitions>
        <StackPanel Name="stackPanel1" Orientation="Horizontal">
            <Button Content="OK" Height="23" Name="buttonSave" Width="75" Click="buttonSave_Click"/>
            <Button Content="Закрыть" Height="23" Name="buttonClose" Width="75" Click="buttonClose_Click"/>
        </StackPanel>
        <Grid DataContext="{StaticResource enterpriseViewSource}" Grid.Row="1" Name="grid1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="186*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <!--<RowDefinition Height="98*" />-->
            </Grid.RowDefinitions>
            <Label Content="Предприятие:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Height="23" HorizontalAlignment="Left" Margin="3,3,0,3" Name="enterprise_nameTextBox" Text="{Binding Path=enterprise_name, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="177" />
            <Label Content="ОКПО:" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="3,3,0,3" Name="okpoTextBox" Text="{Binding Path=okpo, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="177" />
            <Label Content="Адрес:" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="2" Height="23" HorizontalAlignment="Left" Margin="3,3,0,3" Name="addressTextBox" Text="{Binding Path=address, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="177" />
            <Label Content="Телефон:" Grid.Column="0" Grid.Row="3" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="3" Height="23" HorizontalAlignment="Left" Margin="3,3,0,3" Name="phoneTextBox" Text="{Binding Path=phone, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="177" />
            <Label Content="Диспетчер:" Grid.Column="0" Grid.Row="4" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <my:ucSelectPerson Grid.Column="1" Grid.Row="4" HorizontalAlignment="Left" x:Name="ucSelectPerson1" VerticalAlignment="Top" PersonID="{Binding Path=id_dispetcher, Mode=TwoWay}" />
            <Label Content="Механик:" Grid.Column="0" Grid.Row="5" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <my:ucSelectPerson Grid.Column="1" Grid.Row="5" HorizontalAlignment="Left" x:Name="ucSelectPerson2" VerticalAlignment="Top" PersonID="{Binding Path=id_mechanic, Mode=TwoWay}" />
        </Grid>
    </Grid>
</Window>
